package cn.itsource.pojo;

public enum UserLevel {
    BRONZE(0L,"青铜"),
    SILVER(1L,"白银"),
    GOLD(2L,"黄金"),
    PLATINUM(0L,"白金"),
    MASTER(0L,"大师"),
    GRANDMASTER(0L,"宗师"),
    KING(0L,"王者");

    // 可以看出这在枚举类型里定义变量和方法和在普通类里面定义方法和变量没有什么区别。唯一要注意的只是变量和方法定义必须放在所有枚举值定义的后面，否则编译器会给出一个错误。
    private Long key ;
    private String value;

    UserLevel(Long key, String value) {
        this.key = key;
        this.value = value;
    }
}
